/* Copyright (c) 2017, The Linux Foundation. All rights reserved.
 * Copyright (C) 2019 XiaoMi, Inc.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 and
 * only version 2 as published by the Free Software Foundation.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 */

&mdss_mdp {
	dsi_nt36672a_e7t_tianma_fhdplus_video: qcom,mdss_dsi_nt36672a_e7t_tianma_fhdplus_video {
		qcom,mdss-dsi-panel-name = "tianma nt36672a fhdplus video mode dsi panel";
		qcom,mdss-dsi-panel-controller = <&mdss_dsi0>;
		qcom,mdss-dsi-panel-type = "dsi_video_mode";
		qcom,mdss-dsi-panel-framerate = <60>;
		qcom,mdss-dsi-virtual-channel-id = <0>;
		qcom,mdss-dsi-stream = <0>;
		qcom,mdss-dsi-panel-width = <1080>;
		qcom,mdss-dsi-panel-height = <2280>;
		qcom,mdss-pan-physical-width-dimension = <68>;
		qcom,mdss-pan-physical-height-dimension = <143>;
		qcom,mdss-dsi-h-front-porch = <100>;
		qcom,mdss-dsi-h-back-porch = <120>;
		qcom,mdss-dsi-h-pulse-width = <28>;
		qcom,mdss-dsi-h-sync-skew = <0>;
		qcom,mdss-dsi-v-back-porch = <8>;
		qcom,mdss-dsi-v-front-porch = <10>;
		qcom,mdss-dsi-v-pulse-width = <3>;
		qcom,mdss-dsi-h-left-border = <0>;
		qcom,mdss-dsi-h-right-border = <0>;
		qcom,mdss-dsi-v-top-border = <0>;
		qcom,mdss-dsi-v-bottom-border = <0>;
		qcom,mdss-dsi-bpp = <24>;
		qcom,mdss-dsi-underflow-color = <0xff>;
		qcom,mdss-dsi-border-color = <0>;
		qcom,mdss-dsi-h-sync-pulse = <0>;
		qcom,mdss-dsi-traffic-mode = "burst_mode";
		qcom,mdss-dsi-bllp-eof-power-mode;
		qcom,mdss-dsi-bllp-power-mode;
		qcom,mdss-dsi-lane-0-state;
		qcom,mdss-dsi-lane-1-state;
		qcom,mdss-dsi-lane-2-state;
		qcom,mdss-dsi-lane-3-state;
		qcom,mdss-dsi-panel-timings = [fe 3c 2a 00 70 74 2e
				40 30 03 04 00];
		qcom,mdss-dsi-t-clk-post = <0x0f>;
		qcom,mdss-dsi-t-clk-pre = <0x37>;
		qcom,mdss-dsi-bl-min-level = <1>;
		qcom,mdss-dsi-bl-max-level = <4095>;
		qcom,mdss-brightness-max-level = <4095>;
		qcom,mdss-dsi-dma-trigger = "trigger_sw";
		qcom,mdss-dsi-mdp-trigger = "none";
	/*
	 * reg35: enable te output,te signal polarity,te signal active lines within a frame
	 * regff: page select
	 * reg51: bl set(8 or 12 bits)
	 * reg53: bl pwm duty, dimming, bl work
	 * reg55: image enhancement select,cabc mode
	 */
		qcom,mdss-dsi-on-command = [
				15 01 00 00 00 00 02 ff 25
				15 01 00 00 00 00 02 fb 01
				15 01 00 00 00 00 02 18 96
				15 01 00 00 00 00 02 05 04
				15 01 00 00 00 00 02 ff 20
				15 01 00 00 00 00 02 fb 01
				15 01 00 00 00 00 02 78 01
				15 01 00 00 00 00 02 ff 24
				15 01 00 00 00 00 02 fb 01
				15 01 00 00 00 00 02 82 13
				15 01 00 00 00 00 02 84 31
				15 01 00 00 00 00 02 88 13
				15 01 00 00 00 00 02 8a 31
				15 01 00 00 00 00 02 8e e4
				15 01 00 00 00 00 02 8f 01
				15 01 00 00 00 00 02 90 80
				15 01 00 00 00 00 02 ff 26
				15 01 00 00 00 00 02 fb 01
				15 01 00 00 00 00 02 a9 12
				15 01 00 00 00 00 02 aa 10
				15 01 00 00 00 00 02 ae 8a
				15 01 00 00 00 00 02 ff 10
				15 01 00 00 50 00 02 11 00
				15 01 00 00 00 00 02 b0 01
				15 01 00 00 00 00 02 35 00
				15 01 00 00 00 00 02 51 ff
				15 01 00 00 00 00 02 53 2c
				15 01 00 00 00 00 02 55 00
				15 01 00 00 00 00 02 29 00
				];
				qcom,mdss-dsi-off-command = [
				15 01 00 00 14 00 02 28 00
				15 01 00 00 78 00 02 10 00
				];
		qcom,mdss-dsi-on-command-state = "dsi_lp_mode";
		qcom,mdss-dsi-off-command-state = "dsi_hs_mode";
		qcom,mdss-dsi-bl-pmic-control-type = "bl_ctrl_wled";
		qcom,mdss-dsi-reset-sequence = <1 1>, <0 5>, <1 15>;
		qcom,mdss-dsi-tx-eot-append;
		qcom,mdss-dsi-post-init-delay = <1>;

		qcom,esd-check-enabled;
		qcom,mdss-dsi-panel-status-command = [06 01 00 01 05 00 01 0A];
		qcom,mdss-dsi-panel-status-command-state = "dsi_hs_mode";
		qcom,mdss-dsi-panel-status-check-mode = "reg_read";
		qcom,mdss-dsi-panel-status-read-length = <1>;
		qcom,mdss-dsi-panel-status-value = <0x9c>;
		qcom,mdss-dsi-panel-max-error-count = <3>;

		cm,mdss-livedisplay-cabc-ui-cmd = [
				15 01 00 00 00 00 02 FF 23
				15 01 00 00 00 00 02 FB 01
				15 01 00 00 00 00 02 01 84
				15 01 00 00 00 00 02 04 08
				15 01 00 00 00 00 02 05 2D
				15 01 00 00 00 00 02 06 00
				15 01 00 00 00 00 02 11 01
				15 01 00 00 00 00 02 12 80
				15 01 00 00 00 00 02 15 6D
				15 01 00 00 00 00 02 16 0B
				15 01 00 00 00 00 02 29 0A
				15 01 00 00 00 00 02 30 FF
				15 01 00 00 00 00 02 31 FF
				15 01 00 00 00 00 02 32 FF
				15 01 00 00 00 00 02 33 FF
				15 01 00 00 00 00 02 34 FF
				15 01 00 00 00 00 02 35 FF
				15 01 00 00 00 00 02 36 FF
				15 01 00 00 00 00 02 37 FF
				15 01 00 00 00 00 02 38 FC
				15 01 00 00 00 00 02 39 F8
				15 01 00 00 00 00 02 3A F4
				15 01 00 00 00 00 02 3B F1
				15 01 00 00 00 00 02 3D EE
				15 01 00 00 00 00 02 3F EB
				15 01 00 00 00 00 02 40 E8
				15 01 00 00 00 00 02 41 E5

				15 01 00 00 00 00 02 FF 10
				15 01 00 00 00 00 02 FB 01
				15 01 00 00 00 00 02 51 FF
				15 01 00 00 00 00 02 53 2C
				15 01 00 00 00 00 02 55 01
		];
		cm,mdss-livedisplay-cabc-cmd = [
				15 01 00 00 00 00 02 FF 10
				15 01 00 00 00 00 02 FB 01
				15 01 00 00 00 00 02 55 00
		];
	};
};
